function image = vectorToPNG( vector )
% VECTORTOPNG

global IMGSIZE;

vector = (vector + 1)./2;
vector = vector.*255;
image = zeros(IMGSIZE,IMGSIZE,3);
k = 1;

for i = 1:IMGSIZE
    for j = 1:IMGSIZE
       image(i,j,1) = vector(k);
       image(i,j,2) = vector(k);
       image(i,j,3) = vector(k);
       k = k+1;
    end
end

image = uint8(image);

end

